#!/usr/bin/env python3
N = 60000  # 最大子网数量限制
with open("ip_range.txt", "w") as output_file:
    count = 0
    for a in range(10, 256):  # 第一个八位组
        for b in range(0, 256):  # 第二个八位组
            for c in range(0, 256):  # 第三个八位组
                if count >= N:
                    break  # 达到最大数量限制，退出循环
                subnet_start = f"{a}.{b}.{c}.0"
                subnet_end = f"{a}.{b}.{c}.255"
                output_line = f"{subnet_start}-{subnet_end}\n"  # 添加换行符
                output_file.write(output_line)
                count += 1
